gridpack::parallel::Communicator Class Reference

#include <communicator.hpp>

Collaboration diagram for gridpack::parallel::Communicator:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Communicator (void)
 Default constructor (world).
 Communicator (const Communicator &old)
 Copy constructor.
 Communicator (const boost::mpi::communicator &comm)
 Construct with a Boost communicator.
 Communicator (const MPI_Comm &comm)
 Construct from an existing MPI_comm.
Communicatoroperator= (const Communicator &rhs)
 Make this instance the same as another.
 ~Communicator (void)
 Destructor.
int size (void) const
 Get the size of this communicator.
int rank (void) const
 Get this process's rank in this communicator.
int worldRank (void) const
 Get this process's rank in the world communicator.
 operator MPI_Comm () const
 cast to MPI communicator
void barrier () const
Communicator split (int color) const
 Split this instance into several communicators.
Communicator self (void) const
 Get a sub-communicator that is only for this process.
Communicator divide (int nsize) const
 Split this instance in several communicators.
const boost::mpi::communicator & getCommunicator (void) const
 Get the MPI communicator for this instance (const version).
int getGroup (void) const
 Get a (C-style) handle to for the GA process group described by this instance.
void sync (void) const
 Sync GA process group.
void sum (float *x, int nvals) const
void sum (double *x, int nvals) const
void sum (int *x, int nvals) const
void sum (long *x, int nvals) const
void sum (gridpack::ComplexType *x, int nvals) const
void max (float *x, int nvals) const
void max (double *x, int nvals) const
void max (int *x, int nvals) const
void max (long *x, int nvals) const
void min (float *x, int nvals) const
void min (double *x, int nvals) const
void min (int *x, int nvals) const
void min (long *x, int nvals) const

Static Public Member Functions

static void report (void)
 Generate a report about Communicator construction/destruction.

Constructor & Destructor Documentation

gridpack::parallel::Communicator::Communicator ( void   ) 

Default constructor (world).

gridpack::parallel::Communicator::Communicator ( const Communicator old  ) 

Copy constructor.

gridpack::parallel::Communicator::Communicator ( const boost::mpi::communicator &  comm  ) 

Construct with a Boost communicator.

This will only work if all processes on the world communicator call this function (really !?!)

Parameters:
comm existing Communicator
gridpack::parallel::Communicator::Communicator ( const MPI_Comm &  comm  ) 

Construct from an existing MPI_comm.

Parameters:
comm 
gridpack::parallel::Communicator::~Communicator ( void   ) 

Destructor.


Member Function Documentation

void gridpack::parallel::Communicator::barrier (  )  const
Communicator gridpack::parallel::Communicator::divide ( int  nsize  )  const

Split this instance in several communicators.

Each communicator created contains at most nsize processes

Parameters:
nsize 
Returns:
const boost::mpi::communicator& gridpack::parallel::Communicator::getCommunicator ( void   )  const

Get the MPI communicator for this instance (const version).

int gridpack::parallel::Communicator::getGroup ( void   )  const

Get a (C-style) handle to for the GA process group described by this instance.

void gridpack::parallel::Communicator::max ( long *  x,
int  nvals 
) const
void gridpack::parallel::Communicator::max ( int *  x,
int  nvals 
) const
void gridpack::parallel::Communicator::max ( double *  x,
int  nvals 
) const
void gridpack::parallel::Communicator::max ( float *  x,
int  nvals 
) const

Find maximum of vector components over all processors in the communicator

Parameters:
x vector of values to be evaluated
nvals number of values in vector
void gridpack::parallel::Communicator::min ( long *  x,
int  nvals 
) const
void gridpack::parallel::Communicator::min ( int *  x,
int  nvals 
) const
void gridpack::parallel::Communicator::min ( double *  x,
int  nvals 
) const
void gridpack::parallel::Communicator::min ( float *  x,
int  nvals 
) const

Find minimum of vector components over all processors in the communicator

Parameters:
x vector of values to be evaluated
nvals number of values in vector
gridpack::parallel::Communicator::operator MPI_Comm (  )  const

cast to MPI communicator

Communicator& gridpack::parallel::Communicator::operator= ( const Communicator rhs  ) 

Make this instance the same as another.

int gridpack::parallel::Communicator::rank ( void   )  const

Get this process's rank in this communicator.

static void gridpack::parallel::Communicator::report ( void   )  [static]

Generate a report about Communicator construction/destruction.

Communicator gridpack::parallel::Communicator::self ( void   )  const

Get a sub-communicator that is only for this process.

int gridpack::parallel::Communicator::size ( void   )  const

Get the size of this communicator.

Communicator gridpack::parallel::Communicator::split ( int  color  )  const

Split this instance into several communicators.

void gridpack::parallel::Communicator::sum ( gridpack::ComplexType x,
int  nvals 
) const
void gridpack::parallel::Communicator::sum ( long *  x,
int  nvals 
) const
void gridpack::parallel::Communicator::sum ( int *  x,
int  nvals 
) const
void gridpack::parallel::Communicator::sum ( double *  x,
int  nvals 
) const
void gridpack::parallel::Communicator::sum ( float *  x,
int  nvals 
) const

Sum vector over all processors in the communicator

Parameters:
x vector of values to be summed
nvals number of values in vector
void gridpack::parallel::Communicator::sync ( void   )  const

Sync GA process group.

int gridpack::parallel::Communicator::worldRank ( void   )  const

Get this process's rank in the world communicator.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 3 Feb 2020 for GridPACK by  doxygen 1.6.1